<template>
    <div class="cursor" :style="{ visibility: showCursor ? 'visible' : 'hidden' }" style="padding:30px"></div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        showCursor: true
      };
    },
    mounted() {
      // 每500毫秒切换光标的可见性，实现闪烁效果
      setInterval(() => {
        this.showCursor = !this.showCursor;
      }, 500);
    }
  };
  </script>
  
  <style>
  .cursor {
    width: 2px;
    height: 20px;
    background-color: black;
  }
  </style>